package com.globallogic.training.javase.easymock;

import java.util.Date;

public class Teacher {
	
	private String lastName;
	private String firstName;
	private Date dateOfBirth;
	private String placeOfBirth;
	
	public Teacher(String firstName, String lastName, 
			Date dateOfBirth, String placeOfBirth) {
		if (firstName == null || lastName == null) {
			throw new IllegalArgumentException("Name is null");
		}
		
		if (firstName.isEmpty() || lastName.isEmpty()) {
			throw new IllegalArgumentException("Name is blank");
		}
		
		this.firstName = firstName;
		this.lastName = lastName;
		this.dateOfBirth = dateOfBirth;
		this.placeOfBirth = placeOfBirth;
	}
	
	public String getName(){
		return firstName + " " + lastName;
	}
	
	public Date getDateOfBirth() {
		return dateOfBirth;
	}
	
	public String getPlaceOfBirth(){
		return placeOfBirth;
	}

}
